#ifndef HTTPDEFINE_H
#define HTTPDEFINE_H

#define HTTP_SERVER_LISTEN_IP		"localhost"							//http服务监听地址
#define HTTP_SERVER_LISTEN_PORT		8080								//http服务监听端口

#define HTTP_CLIENT_LOGIN			"/client?Action=Login"				//系统登录URI
#define HTTP_CLIENT_LOGOUT			"/client?Action=Logout"				//系统登出URI
#define HTTP_CLIENT_HEARBEAT		"/client?Action=Heartbeat"			//心跳URI

typedef enum {
    HTTP_RESPOND_CODE_OK = 200,                             // 请求成功处理
    HTTP_RESPOND_CODE_BAD_REQUEST = 400,                    // 客户端请求格式错误或语法错误
    HTTP_RESPOND_CODE_UNAUTHORIZED = 401,                   // 请求要求用户身份验证，用户未提供有效凭据
    HTTP_RESPOND_CODE_FORBIDDEN = 403,                      // 服务器拒绝执行所请求的操作
    HTTP_RESPOND_CODE_NOT_FOUND = 404,                      // 服务器找不到请求的资源
    HTTP_RESPOND_CODE_INTERNAL_SERVER_ERROR = 500,          // 服务器内部错误，无法完成请求
    HTTP_RESPOND_CODE_SERVICE_UNAVAILABLE = 503,            // 服务器当前无法处理请求
    HTTP_RESPOND_CODE_NO_DEVICE = -1001,                    // 没有找到设备
    HTTP_RESPOND_CODE_USB_USING = -1002,                    // USB设备正在被占用
    HTTP_RESPOND_CODE_NO_VALUE = -1003,                     // 请求参数缺少
    HTTP_RESPOND_CODE_4XX_CLIENT_ERROR = -9001,             // 客户端错误(客户端请求错误)
    HTTP_RESPOND_CODE_5XX_SERVER_ERROR = -9002              // 服务器错误(服务器内部错误)
} http_respond_code_t;

const char* HTTP_RESPOND_MESSAGES[] = {
    "Request successfully processed.",
    "The client's request has an incorrect format or syntax error.",
    "The request requires user authentication, but the user has not provided valid credentials.",
    "The server has refused to execute the requested operation.",
    "An internal server error has occurred, and the request cannot be completed.",
    "The server is currently unable to handle the request.",
    "The device cannot be found.",
    "The USB device is currently in use by another process.",
    "The request is missing required parameters.",
    "Client error (client request error).",
    "Server error (internal server error)."
};



#endif // HTTPDEFINE_H
